package com.example.warehouse.bus.dao.persist.mapper;


import com.example.warehouse.bus.pojo.param.BusSalesbackSelectParam;
import com.example.warehouse.bus.pojo.param.BusSalesbackUpdateParam;
import com.example.warehouse.bus.pojo.vo.BusSalesbackSelectVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 销售退货订单_数据层_Mapper接口
 */
@Repository
public interface BusSalesbackMapper {

    /**
     * 新增_销售退货订单
     *
     * @param id
     * @param description
     * @param idpipo
     * @return
     */
    int insert(Long id, String description, Long idpipo);

    /**
     * 逻辑删除_销售退货订单
     *
     * @param id
     * @param idpipo
     * @return
     */
    int delete(Long id, Long idpipo);

    /**
     * 任意项更改_销售退货订单
     *
     * @param busSalesbackUpdateParam
     * @param idpipo
     * @return
     */
    int update(@Param("p") BusSalesbackUpdateParam busSalesbackUpdateParam, Long idpipo);

    /**
     * 审批_销售退货订单
     *
     * @param id
     * @param approval
     * @param idpipo
     * @return
     */
    int approvalSalesback(Long id, Integer approval, Long idpipo);

    /**
     * 分页模糊查询_销售退货订单_当前页面列表
     *
     * @param busSalesbackSelectParam
     * @param ignore
     * @param pageSize
     * @return
     */
    List<BusSalesbackSelectVO> select(@Param("p") BusSalesbackSelectParam busSalesbackSelectParam, Integer ignore, Integer pageSize);

    /**
     * 分页模糊查询_销售退货订单_结果总条数
     *
     * @param busSalesbackSelectParam
     * @return
     */
    Long count(@Param("p") BusSalesbackSelectParam busSalesbackSelectParam);

}
